package com.csxh.service;

import java.util.List;

import com.csxh.bean.Area;
import com.csxh.bean.City;
import com.csxh.bean.Province;

public class CityService extends AbstractJdbcDao<City> {

	public Province parent(City city){
		
		ProvinceService service=new ProvinceService();
		String provincecode=city.getProvincecode();
		return service.findOneByCondition("code=?", provincecode);
	}
	
	public List<Area> children(City c){
		AreaService service=new AreaService();
		return service.findAllByCondition("citycode=?", c.getCode());
	}
	
}
